import { request } from '../../../../config/request'
import config from '../../../../config/config'

// 角色详情
export async function getDetail(params) {
	return request({
		url: `${config.sysApiHeader}/v1/pearlriver/comm/role/detail/get`,
		method: 'GET',
		data: params
	});
};

// 角色新增
export async function addRole(params) {
	return request({
		url: `${config.sysApiHeader}/v1/pearlriver/comm/role/save`,
		method: 'PUT',
		data: params
	});
};

// 角色修改
export async function editRole(params) {
	return request({
		url: `${config.sysApiHeader}/v1/pearlriver/comm/role/save`,
		method: 'PUT',
		data: params
	});
};

// 获取资源树
export async function getResource(params) {
	return request({
		url: `${config.sysApiHeader}/v1/pearlriver/comm/resource/application/get`,
		method: 'GET',
		data: params
	});
};

// 获取应用列表
export async function getAppList(params) {
	return request({
		url: `${config.sysApiHeader}/v1/pearlriver/comm/role/application/list`,
		method: 'GET',
		data: params
	});
};


















